package com.jk.web.service;

import com.jk.common.model.ChinaAddressBean;
import com.jk.common.model.FlowerBean;
import com.jk.common.model.OrderBean;
import com.jk.web.service.hystrix.OrderServiceHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "zuul-server",fallback = OrderServiceHystrix.class)
public interface OrderService {

    @RequestMapping("/order-server/order/createOrder")
    String createOrder(@RequestParam("productId") String productId);

    @RequestMapping("/order-server/order/getProviceBind")
    List<ChinaAddressBean> getProviceBind(@RequestParam("pid") Integer pid);


    //查询mongdb
    @RequestMapping("/order-server/order/orderNumber")
    OrderBean orderNumber(@RequestParam("orderNumber")String  orderNumber);

    //修改支付状态
    @RequestMapping("/order-server/order/saveOrder")
    void saveOrder(@RequestParam("orderNumber")String orderNumber);

    @RequestMapping("/order-server/order/queryFlowerPrice")
    FlowerBean queryFlowerPrice(@RequestParam("flowerId") Integer flowerId);


}
